unit ufmBase;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TfmBase = class(TForm)
    procedure FormDestroy(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
  end;

var
  fmBase: TfmBase;

implementation

{$R *.dfm}

procedure TfmBase.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TfmBase.FormDestroy(Sender: TObject);
begin
  fmBase := nil;
end;

procedure TfmBase.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if (Key = #13) then
  begin
    begin
      Key := #0;
      Perform(WM_NEXTDLGCTL, 0, 0);
    end;
  end;
end;

end.
